package com.core.visitor.bo;

import java.util.List;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import com.core.visitor.dao.VisitorDao;
import com.core.visitor.dto.VisitorSearchCondition;
import com.core.visitor.pojo.Visitor;

@Service
public class VisitorBo {
	protected Logger log = Logger.getLogger(this.getClass());
	@Resource
	private VisitorDao visitorDao;
	public Visitor getPojo(Visitor visitor) {
		return visitorDao.getPojo(visitor);
	}
	
	public Visitor getById(Visitor visitor) {
		return visitorDao.getById(visitor.getId());
	}
	public Visitor getFirstVisitor(Long visaInfoId) {
		return visitorDao.getFirstVisitor(visaInfoId);
	}
	public void  add(Visitor visitor) {
		visitorDao.add(visitor);
	}
	public void update(Visitor visitor) {
		visitorDao.update(visitor);
	}
	public void del(Visitor visitor) {
		visitorDao.del(visitor);
	}
	public List<Visitor> searchPojoList(VisitorSearchCondition sc) {
		return visitorDao.searchPojoList(sc);
	}
	
	public Integer searchCnt(VisitorSearchCondition sc) {
		return visitorDao.searchCnt(sc);
	}
	
	public List<Visitor> getVisitorList(VisitorSearchCondition sc) {
		
		return visitorDao.getVisitorList2(sc);
	}
}
